<!-- One Comment Row -->
<script type="text/javascript">
$(document).ready(function() {
	$(".commentRow").live('mouseover',function() {
			$(this).children(".commentRowControl").show();
	});
	$(".commentRow").live('mouseout',function() {
		$(this).children(".commentRowControl").hide();
	});
});



</script>
<div class="commentRow">
	<a href=""><?php echo $data->commentPostedByUser->user_name;?></a> 
	<?php echo Html::formatDate($data->comment_posted_date)." at ". Html::formatTime($data->comment_posted_date);?>
	<div class="commentRowControl" id="control1" style="display: none;">
		<?php 
			$oid   = Yii::app()->request->getParam('oid');
			$pid   = Yii::app()->request->getParam('pid');
			$ctype = Yii::app()->request->getParam('ctype');
			
			echo Chtml::ajaxLink(null, $this->createUrl('/comment/index',array('pid'=>$pid,'oid'=>$oid,'ctype'=>$ctype)),
				array(
					'type'=>'POST',
					'data'=>array('action'=>'del','cid'=>$data->comment_id),
					'beforeSend'=>'function() {
						$("#listcomment").addClass("loading");
					}',
					'update'=>'#listcomment',
					'complete'=>'function(){
						$("#listcomment").removeClass("loading");
						$("#commentBody").val("");
					}',
				),
				array(
					'class'=>"cmDelete",
					'title'=>"Remove",
				)
			);
		?>
	</div>
	<div class="commentAvatar">
		<img src="<?php echo Html::imageUrl("a5.png");?>" />
	</div>
	<div class="commentContent">
		<p><?php echo $data->comment_content;?></p>
	</div>
</div>
<!-- End One Comment Row -->